 /**
 * 子模块路由
 * DHpai
 */

var router = function($urlRouterProvider, $stateProvider){


 	$stateProvider


   //系统列表
    .state('app.systemList', {
        url: "/system/systemlist",
        views: {
            'main@' : {
                template : require('../996tpl/views/table.html'),
                controller : 'systemList',
            }
        },
        resolve:{
            tableconfig : function(tableservice){
                return tableservice.tableconfig();
            },
        }
    })
   
    //编辑系统信息
    .state('app.systemEdit', {
        url: "/system/systemedit/:id",
        views: {
            'main@' : {
                template : require('../996tpl/views/form.html'),
                controller : 'systemEdit',
            }
        },
        resolve:{
            formconfig : function(formservice){
                return formservice.formconfig();
            },
            model : function(systemservice){
                return systemservice.model;
            }
        }
    })

    //创建系统
    .state('app.systemCreate', {
        url: "/system/systemcreate",
        views: {
            'main@' : {
                template : require('../996tpl/views/form.html'),
                controller : 'systemCreate',
            }
        },
        resolve:{
            formconfig : function(formservice){
                return formservice.formconfig();
            },
            model : function(systemservice){
                return systemservice.model;
            }
        }
    })



	;

};

module.exports = router;